﻿using System.Windows.Media;

namespace DeskRedis.Comm.Factory
{
    /// <summary>
    /// Path路径工厂
    /// </summary>
    public static class PathFactory
    {
        /// <summary>
        /// “连接”Path路径
        /// </summary>
        public static string[] Connection = new string[]
        {
            "M953.437 74.622l-4.032-4.032a242.745 242.745 0 0 0-342.325 0L388.974 " +
            "288.76a242.745 242.745 0 0 0 0 342.26l4.032 4.033c7.808 7.871 16.128 14.911 24.767 " +
            "21.439l79.806-79.806a130.684 130.684 " +
            "0 0 1-26.111-20.095l-4.032-4.032a131.196 131.196 0 0 1 0-185.402l218.041-218.042a131.196 131.196 " +
            "0 0 1 185.403 0l4.031 4.032a131.26 131.26 0 0 1 0 185.403l-98.62 98.557a338.55 338.55 " +
            "0 0 1 24.51 132.348l152.636-152.572a242.745 242.745 0 0 0 0-342.325zM631.079 388.916a240.057 240.057 " +
            "0 0 0-24.703-21.44l-79.87 79.87c9.28 5.504 18.112 12.16 26.111 20.096l4.032 4.032a131.196 131.196 " +
            "0 0 1 0 185.402L338.608 874.853a131.196 131.196 0 0 1-185.402 0l-4.032-4.032a131.26 131.26 " +
            "0 0 1 0-185.402l98.62-98.557a338.55 338.55 0 0 1-24.51-132.348L70.647 607.021a242.745 242.745 0 0 " +
            "0 0 342.326l4.032 4.032a242.809 242.809 0 0 0 342.325 0l218.106-218.106a242.745 242.745 0 0 0 0-342.325l-4.032-4.032z"
        };

        /// <summary>
        /// “数据库”Path路径
        /// </summary>
        public static string[] DataBase = new string[]
        {
            "M511.993833 0C229.193814 0 0.006167 71.70516 0.006167 160.010792v128.030833c0 " +
            "88.354965 229.187648 159.998458 511.987666 159.998458s511.987667-71.70516 511.987667-159.998458V160.010792C1023.969167 " +
            "71.70516 794.756853 0 511.993833 0z m0 544.066291C229.193814 544.066291 0.006167 472.324132 0.006167 " +
            "384.006167v192.003083c0 88.342631 229.187648 159.998458 511.987666 159.998458s511.987667-71.692827 " +
            "511.987667-159.998458V384.092499c-0.012333 88.305632-229.224647 159.973792-511.987667 159.973792z m0 " +
            "287.979958C229.193814 832.046249 0.006167 760.353423 0.006167 672.060124v191.929084c0 88.367298 229.187648 " +
            "160.010792 511.987666 160.010792s511.987667-71.70516 511.987667-160.010792V672.060124c0 88.342631-229.224647 " +
            "159.998458-511.987667 159.998459z"
        };

        /// <summary>
        /// “键”Path路径
        /// </summary>
        public static string[] Key = new string[]
        {
            "M730.638507 418.688c-32 0-63.018667 0-92.074667 10.112C514.01984 322.688 184.93184 42.581333 " +
            "159.84384 16.512 148.281173 4.437333 135.481173 0 122.894507 0c-20.906667 0-41.088 12.8-52.394667 23.637333C53.518507 " +
            "39.850667-10.737493 109.312 1.550507 122.112c36.949333 37.888 46.805333 45.525333 62.037333 61.013333 22.912 23.381333 " +
            "69.674667-2.432 88.618667 5.674667 18.688 8.106667 22.613333 16.725333 25.6 30.762667 2.986667 14.037333-7.125333 " +
            "38.912-7.381334 58.325333-0.256 20.48 8.362667 31.530667 22.613334 46.805333 11.349333 12.288 21.930667 21.162667 " +
            "38.4 21.418667 22.186667 0.469333 51.456-31.530667 74.837333-7.68 23.381333 23.893333-15.232 58.368-12.288 83.712 " +
            "2.944 25.344 38.144 56.149333 53.162667 59.306667 15.018667 3.242667 53.632-28.757333 75.52-23.850667 7.424 1.706667 " +
            "24.661333 16.725333 27.093333 28.074667 2.474667 11.306667-16.981333 61.525333-14.506667 72.832 2.986667 13.781333 " +
            "17.493333 29.781333 25.6 42.837333-16.469333 38.144-23.125333 72.874667-23.125333 117.418667 0 168.618667 131.413333 " +
            "305.237333 293.376 305.237333C893.070507 1024 1024.014507 887.381333 1024.014507 " +
            "718.762667s-131.413333-300.074667-293.376-300.074667z m56.192 447.786667a78.634667 78.634667 " +
            "0 0 1-78.677334-78.762667 78.634667 78.634667 0 1 1 157.354667 0 78.634667 78.634667 0 0 1-78.677333 78.762667z"
        };

        /// <summary>
        /// “文件夹”Path路径
        /// </summary>
        public static string[] Folder = new string[]
        {
            "M853.333333 256H469.333333l-85.333333-85.333333H170.666667c-46.933333 0-85.333333 38.4-85.333334 " +
            "85.333333v170.666667h853.333334v-85.333334c0-46.933333-38.4-85.333333-85.333334-85.333333z",
            "M853.333333 256H170.666667c-46.933333 0-85.333333 38.4-85.333334 85.333333v426.666667c0 46.933333 " +
            "38.4 85.333333 85.333334 85.333333h682.666666c46.933333 0 85.333333-38.4 " +
            "85.333334-85.333333V341.333333c0-46.933333-38.4-85.333333-85.333334-85.333333z"
        };


        /// <summary>
        /// 创建图标的Path路径。
        /// </summary>
        /// <param name="paths">path路径</param>
        /// <returns></returns>
        public static GeometryGroup CreateConnection(string[] paths)
        {
            GeometryGroup group = new GeometryGroup();
            foreach (string path in paths)
            {
                group.Children.Add(Geometry.Parse(path));
            }
            return group;
        }
    }
}
